﻿@model handvn.Models.User

@{
    ViewBag.Title = "Details";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}
@if (Request.IsAuthenticated && @Session["LoaiTaiKhoan"]!=null)
{
    if (@Session["LoaiTaiKhoan"].ToString() == "admin")
    {
<h1>Quản lý người dùng</h1>
<h2>Details</h2>

<fieldset>
    <legend>User</legend>

    <div class="display-label">Username</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Username)
    </div>

    <div class="display-label">Password1</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Password1)
    </div>

    <div class="display-label">Password2</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Password2)
    </div>

    <div class="display-label">TenKhachhang</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.TenKhachhang)
    </div>

    <div class="display-label">CMND</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.CMND)
    </div>

    <div class="display-label">DienThoai</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.DienThoai)
    </div>

    <div class="display-label">Email</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Email)
    </div>

    <div class="display-label">DiaChi</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.DiaChi)
    </div>

    <div class="display-label">NgayDangKy</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.NgayDangKy)
    </div>

    <div class="display-label">HinhAnh</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.HinhAnh)
    </div>

    <div class="display-label">CategoriesUser</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.CategoriesUser.TenLoaiNguoiDung)
    </div>

    <div class="display-label">TinhTrang</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.TinhTrang)
    </div>
</fieldset>
<p>
    @Html.ActionLink("Edit", "Edit", new { id = Model.UserID }) |
    @Html.ActionLink("Back to List", "Index")
</p>
    }
}
else
{
    <p>
        Xin vui lòng đăng nhập</p>
    <script type="text/javascript">
        window.location.href = "http://localhost:5286/Account/Admin"
    </script>
}